const routes = [
    // 首页
    {
        path: '/console/',
        name: 'home',
        component: HomeView,
        meta: { requiresAuth: true },
    },

    // user
    {
        path: '/console/user/:id',
        name: 'user',
        component: () => import('../views/user/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/profile',
        name: 'userProfile',
        component: () => import('../views/user/Profile.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/preferences',
        name: 'userPreferences',
        component: () => import('../views/user/Preferences.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/edit',
        name: 'userEdit',
        component: () => import('../views/user/Edit.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/changePwd',
        name: 'userChangePwd',
        component: () => import('../views/user/ChangePwd.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/language',
        name: 'userLanguage',
        component: () => import('../views/user/Language.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/forum',
        name: 'userForum',
        component: () => import('../views/user/Forum.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/editor',
        name: 'userEditor',
        component: () => import('../views/user/Editor.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/calendar',
        name: 'userCalendar',
        component: () => import('../views/user/Calendar.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/user/contentbank',
        name: 'userContentbank',
        component: () => import('../views/user/Contentbank.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/member',
        name: 'userMember',
        component: () => import('../views/user/Member.vue'),
        meta: { requiresAuth: true },
    },

    // my
    {
        path: '/console/my',
        name: 'my',
        component: () => import('../views/my/index.vue'),
        meta: { requiresAuth: true },
    },

    // message
    {
        path: '/console/message',
        name: 'message',
        component: () => import('../views/message/index.vue'),
        meta: {
            requiresAuth: true,
            hideHeader: true,
            hideFooter: true,
        },
    },
    {
        path: '/console/message/notifications',
        name: 'messageNotifications',
        component: () => import('../views/message/Notifications.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/message/notificationPreferences',
        name: 'messageNotificationPreferences',
        component: () => import('../views/message/NotificationPreferences.vue'),
        meta: { requiresAuth: true },
    },

    // grade
    {
        path: '/console/course/grade/report/overview',
        name: 'gradeReportOverview',
        component: () => import('../views/grade/Report/Overview/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/grade/report/user',
        name: 'gradeReportUser',
        component: () => import('../views/grade/Report/User/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/grade/report/grade',
        name: 'gradeReportGrade',
        component: () => import('../views/grade/Report/Grader/index.vue'),
        meta: {
            requiresAuth: true,
            deniedRoleIds: [3],
        },
    },

    // tag
    {
        path: '/console/tag/search',
        name: 'tagSearch',
        component: () => import('../views/tag/Search.vue'),
        meta: { requiresAuth: true },
    },

    // calendar
    {
        path: '/console/calendar/view',
        name: 'calendarView',
        component: () => import('../views/calendar/View.vue'),
        meta: { requiresAuth: true },
    },

    // mode
    {
        path: '/console/mod/forum/:id',
        name: 'modForum',
        component: () => import('../views/mod/Forum/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/mod/forum/discuss/:id',
        name: 'modForumDiscuss',
        component: () => import('../views/mod/Forum/Discuss.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/mod/announcement',
        name: 'modAnnouncement',
        component: () => import('../views/mod/Announcement/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/mod/discuss/:id',
        name: 'modAnnouncementDiscuss',
        component: () => import('../views/mod/Announcement/Discuss.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/mod/forum/search',
        name: 'modForumSearch',
        component: () => import('../views/mod/Forum/Search.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/mod/book',
        name: 'modBook',
        component: () => import('../views/mod/Book/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/mod/contact',
        name: 'modContact',
        component: () => import('../views/mod/Contact/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/videoTime/:id',
        name: 'modVideoTime',
        component: () => import('../views/mod/VideoTime/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/quiz/view/:id',
        name: 'modQuizView',
        component: () => import('../views/mod/Quiz/View.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/quiz/attempt/:id',
        name: 'modQuizAttempt',
        component: () => import('../views/mod/Quiz/Attempt.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/quiz/review/:id',
        name: 'modQuizReview',
        component: () => import('../views/mod/Quiz/Review.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/quiz/summary/:id',
        name: 'modQuizSummary',
        component: () => import('../views/mod/Quiz/Summary.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/quiz/report/:id',
        name: 'modQuizReport',
        component: () => import('../views/mod/Quiz/Report.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/unit/folder/view/:id',
        name: 'modFolderView',
        component: () => import('../views/mod/Folder/View.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/assign/view/:id',
        name: 'modAssignView',
        component: () => import('../views/mod/Assign/View.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/unit/assign/report/:id',
        name: 'modAssignReport',
        component: () => import('../views/mod/Assign/Report.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/unit/assign/correct/:id',
        name: 'modAssignCorrect',
        component: () => import('../views/mod/Assign/Correct.vue'),
        meta: {
            requiresAuth: true,
            deniedRoleIds: [3],
            hideHeader: true,
            hideFooter: true,
        },
    },

    // course
    {
        path: '/console/course/:id',
        name: 'course',
        component: () => import('../views/course/index.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/:courseId/view/:id',
        name: 'courseView',
        component: () => import('../views/course/View.vue'),
        meta: { requiresAuth: true },
    },
    {
        path: '/console/course/edit/:id',
        name: 'courseEdit',
        component: () => import('../views/course/Edit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/create',
        name: 'courseCreate',
        component: () => import('../views/course/Edit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/resource/edit/:id',
        name: 'courseResourceEdit',
        component: () => import('../views/course/ResourceEdit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/unit/edit/:id',
        name: 'courseUnitEdit',
        component: () => import('../views/course/UnitEdit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/unit/create',
        name: 'courseUnitCreate',
        component: () => import('../views/course/UnitEdit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/category',
        name: 'courseCategory',
        component: () => import('../views/course/category/index.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/category/edit/:id',
        name: 'courseCategoryEdit',
        component: () => import('../views/course/category/Edit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/course/category/create',
        name: 'courseCategoryCreate',
        component: () => import('../views/course/category/Edit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },

    // question
    {
        path: '/console/question',
        name: 'question',
        component: () => import('../views/question/index.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/question/edit/:id',
        name: 'questionEdit',
        component: () => import('../views/question/Edit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/question/create',
        name: 'questionCreate',
        component: () => import('../views/question/Edit.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },
    {
        path: '/console/question/category',
        name: 'questionCategory',
        component: () => import('../views/question/Category.vue'),
        meta: { requiresAuth: true, deniedRoleIds: [3] },
    },

    // 登录
    {
        path: '/',
        name: 'login',
        component: () => import('../views/Login.vue'),
        meta: {
            requiresAuth: false,
            layout: 'login',
            hideHeader: true,
            hideFooter: true,
        },
    },
    {
        path: '/forgetPwd',
        name: 'forgetPwd',
        component: () => import('../views/ForgetPwd.vue'),
        meta: {
            requiresAuth: false,
            layout: 'login',
            hideHeader: true,
            hideFooter: true,
        },
    },
    {
        path: '/forgetPwd/continue',
        name: 'forgetPwdContinue',
        component: () => import('../views/ForgetPwd_continue.vue'),
        meta: {
            requiresAuth: false,
            layout: 'login',
            hideHeader: true,
            hideFooter: true,
        },
    },
    {
        path: '/resetPassword',
        name: 'resetPassword',
        component: () => import('../views/ResetPassword.vue'),
        meta: {
            requiresAuth: false,
            layout: 'login',
            hideHeader: true,
            hideFooter: true,
        },
    },
]
